/* 主页面样式 */

/* 背景设置 */
body {
    /* background-image: url('../image/治愈天空.jpg'); */
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
}

/* 添加半透明遮罩层 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(13, 17, 23, 0.8);
    z-index: -1;
}

/* 主容器布局 */
.main-container {
    display: grid;
    grid-template-columns: 1fr 2.1fr 1fr;
    gap: 20px;
    padding: 20px;
    min-height: calc(100vh - 100px);
}

/* 通用卡片样式 */
.card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    backdrop-filter: blur(10px);
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* 左侧栏样式 */
.left-sidebar {
    background: rgba(255, 255, 255, 0);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    backdrop-filter: blur(10px);
    padding: 20px;
    height: fit-content;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: #e6edf3;
    margin: 0;
}

.new-btn {
    background: rgba(88, 166, 255, 0);
    border: 1px solid rgba(88, 166, 255, 0.3);
    color: #58a6ff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.new-btn:hover {
    background: rgba(88, 166, 255, 0.2);
    border-color: #58a6ff;
}

/* 搜索区域 */
.search-section {
    margin-bottom: 20px;
}

.search-box {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 8px 12px;
    gap: 8px;
}

.search-box i {
    color: #7d8590;
    font-size: 14px;
}

.search-box input {
    flex: 1;
    background: none;
    border: none;
    color: #e6edf3;
    font-size: 14px;
    outline: none;
}

.search-box input::placeholder {
    color: #7d8590;
}

/* 章节列表 */
.chapter-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chapter-item {
    border-radius: 6px;
    overflow: hidden;
}

.chapter-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    cursor: pointer;
    transition: background-color 0.2s;
    border-radius: 6px;
}

.chapter-header:hover {
    background: rgba(255, 255, 255, 0);
}

.chapter-arrow {
    font-size: 12px;
    color: #7d8590;
    transition: transform 0.2s;
}

.chapter-header span {
    color: #e6edf3;
    font-weight: 500;
}

.topic-list {
    display: none;
    padding-left: 20px;
    margin-top: 5px;
}

.topic-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s;
    margin-bottom: 2px;
}

.topic-item:hover {
    background: rgba(255, 255, 255, 0);
}

.topic-item i {
    font-size: 12px;
    color: #7d8590;
}

.topic-item span {
    color: #c9d1d9;
    font-size: 14px;
}

/* 中间内容区域 */
.main-content {
    background: rgba(255, 255, 255, 0);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    backdrop-filter: blur(10px);
    padding: 20px;
    height: fit-content;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.content-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: #e6edf3;
    margin: 0;
}

.filter-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-btn {
    background: rgba(255, 255, 255, 0);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #c9d1d9;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.filter-btn.active {
    background: rgba(88, 166, 255, 0.1);
    border-color: rgba(88, 166, 255, 0.3);
    color: #58a6ff;
}

.practice-btn {
    background: rgba(46, 160, 67, 0.1);
    border: 1px solid rgba(46, 160, 67, 0.3);
    color: #2ea043;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-left: 10px;
}

.practice-btn:hover {
    background: rgba(46, 160, 67, 0.2);
    border-color: #2ea043;
}

/* 题目动态列表 */
.topic-dynamics {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.dynamic-item {
    background: rgba(255, 255, 255, 0);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 16px;
    transition: all 0.2s;
    cursor: pointer;
}

.dynamic-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.item-header h3 {
    font-size: 16px;
    font-weight: 500;
    color: #e6edf3;
    margin: 0;
}

.time {
    font-size: 12px;
    color: #7d8590;
}

.item-desc {
    color: #c9d1d9;
    font-size: 14px;
    line-height: 1.5;
    margin: 8px 0 12px 0;
}

.item-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.tag {
    background: rgba(88, 166, 255, 0.1);
    color: #58a6ff;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    border: 1px solid rgba(88, 166, 255, 0.2);
}

/* 题目详情样式 */
.topic-detail {
    background: rgba(255, 255, 255, 0);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 20px;
}

.topic-detail h3 {
    color: #e6edf3;
    margin-bottom: 15px;
    font-size: 18px;
}

.detail-content p {
    color: #c9d1d9;
    line-height: 1.6;
    margin-bottom: 20px;
}

.detail-actions {
    display: flex;
    gap: 10px;
}

.action-btn {
    background: rgba(255, 255, 255, 0);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #c9d1d9;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.action-btn.delete {
    background: rgba(248, 81, 73, 0.1);
    border-color: rgba(248, 81, 73, 0.3);
    color: #f85149;
}

.action-btn.delete:hover {
    background: rgba(248, 81, 73, 0.2);
    border-color: #f85149;
}

/* 右侧栏样式 */
.right-sidebar {
    background: rgba(255, 255, 255, 0);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    backdrop-filter: blur(10px);
    padding: 20px;
    height: fit-content;
}

/* 笔记列表 */
.notes-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.note-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 12px;
    transition: all 0.2s;
    cursor: pointer;
}

.note-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
}

.note-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.note-header h4 {
    font-size: 14px;
    font-weight: 500;
    color: #e6edf3;
    margin: 0;
}

.note-time {
    font-size: 11px;
    color: #7d8590;
}

.note-preview {
    color: #c9d1d9;
    font-size: 12px;
    line-height: 1.4;
    margin: 6px 0 8px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.note-tags {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.note-tag {
    background: rgba(163, 113, 247, 0.1);
    color: #a371f7;
    padding: 1px 6px;
    border-radius: 8px;
    font-size: 10px;
    border: 1px solid rgba(163, 113, 247, 0.2);
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .main-container {
        grid-template-columns: 1fr 2fr 1fr;
        gap: 15px;
        padding: 15px;
    }
}

@media (max-width: 768px) {
    .main-container {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 10px;
    }
    
    .content-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .filter-buttons {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}